<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>isPlainObject</title>
</head>

<body>
    <script>
        const isPlainObject = val =>
            !!val && typeof val === 'object' && val.constructor === Object;
        const tasks = [
            {
                key: "isPlainObject({ a: 1 })",
                value: isPlainObject({ a: 1 })
            },
            {
                key: "isPlainObject(new Map())",
                value: isPlainObject(new Map())
            }
        ]
        document.write(`${tasks.map(({ key, value }) => `<div>${key}的结果是:${value}</div>`).join('')}`)
    </script>
</body>

</html>